<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<script src="plug-in/tools/popup/userSelect.js"></script>
<script src="plug-in/tools/popup/departSelect.js"></script>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding:0px;border:0px">
		<t:datagrid name="surveyList"  title="" fitColumns="false" actionUrl="surveyInfoController.do?datagrid" idField="id" fit="true" autoLoadData="true" queryMode="group">
			<t:dgCol title="common.id" field="id" hidden="true"></t:dgCol>
			<t:dgCol title="案件流水号" field="reportNo" query="true" ></t:dgCol>
			<t:dgCol title="甲方车牌号" field="carsNo" query="true" ></t:dgCol>
			<t:dgCol title="甲方联系方式" field="driverPhone" query="true" ></t:dgCol>
			<t:dgCol title="甲方驾驶员" field="jiaDriName" query="true"></t:dgCol>
			
			<t:dgCol title="乙方车牌号" field="yiCarNo" query="true" ></t:dgCol>
			<t:dgCol title="乙方联系方式" field="yiPhone" query="true" ></t:dgCol>
			<t:dgCol title="乙方驾驶员" field="yiDriName" query="true"></t:dgCol>
			
			<t:dgCol title="流入时间 " field="createTm" query="true" queryMode="group"></t:dgCol>
			<t:dgCol title="服务人员" field="appUser.empName" query="true"></t:dgCol>
			<t:dgCol title="服务点" field="workSpace"  special="服务点" query="true" ></t:dgCol>
			<t:dgCol title="所属交警" field="trafficPolice"></t:dgCol>
			<t:dgCol title="出险地点" showLen="15" field="dangerPlace"></t:dgCol>
			<t:dgCol title="案件状态"  field="caseStatus" query="true" replace="已提交_S,注销_C,已完成_F" style="background:#f2dede;color:#a94442;_C,background:#d9edf7;color:#31708f;_S,background:#dff0d8;color:#3c763d;_F"></t:dgCol>
			<t:dgCol title="处理状态" field="checkFlag" query="true" replace="新任务_0,处理中_1,已处理_2" style="background:#f2dede;color:#a94442;_0,background:#d9edf7;color:#31708f;_1,background:#dff0d8;color:#3c763d;_2"></t:dgCol>
			<t:dgCol title="核损案件"  field="evalSur" replace="存在_t"></t:dgCol>
			<t:dgCol title="抽查状况" field="spotCheck"  hidden="true" query="true" replace="合格_p,不合格_f"></t:dgCol>
			
			<t:dgCol title="是否可疑" field="ask"   query="true" replace="是_是,否_否"></t:dgCol>
			<t:dgCol title="减损类型" field="askType"    ></t:dgCol>
			
			
			<t:dgCol title="修改" field="ifModify" query="true" replace="否_0,是_1" style="background:red;color:white;_1"></t:dgCol>
			
			
			<t:dgCol title="common.operation" field="opt"  style="width:80px"></t:dgCol>
			<t:dgFunOpt funname="searchDetailInfo(reportNo)" title="详情" urlStyle="color:blue"></t:dgFunOpt>
			<t:dgFunOpt funname="updateCase(reportNo,ifModify)" title="修改" urlStyle="color:red" operationCode="btn_001"></t:dgFunOpt>
		</t:datagrid>
	</div>
</div>

<script type="text/javascript">
	$(document).ready(function(){
		$("input[name='createTm_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
		$("input[name='createTm_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
	});
	
	function searchDetailInfo(reportNo){
		addOneTab('<t:mutiLang langKey="案件详情"/>' , "surveyInfoController.do?toCarInfo&reportNo="+reportNo);
	}
	
	function updateCase(reportNo,ifModify){
		if("0" == ifModify){
			alert("此案件无需修改！");
			return false;
		}
		add('<t:mutiLang langKey="common.add.param" langArg="案件修改"/>', "surveyInfoController.do?toUpdateCase&reportNo="+reportNo,"");
	}
	
</script>
